package com.cy.ppj.dao.mapper.account;

import com.cy.ppj.model.domian.account.TeamCommission;
import com.cy.ppj.model.query.account.TeamMemberQuery;
import com.cy.ppj.model.vo.admin.teamcommission.TeamMemberAdminVO;
import com.cy.ppj.model.vo.admin.teamcommission.TeamMemberCountStatisticsVO;
import com.cy.ppj.model.vo.front.account.MyTeamStatisticsVO;
import com.cy.ppj.model.vo.front.account.MyTeamVO;
import com.cy.ppj.model.vo.front.account.TeamMemberVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Mapper
public interface TeamCommissionMapper extends BaseMapper<TeamCommission> {

    int addAmount(@Param("userId") Long userId, @Param("memberUserId") Long memberUserId, @Param("amount") BigDecimal amount);

    List<TeamMemberVO> selectTeamMembers(TeamMemberQuery query);

    int selectTeamMemberCount(TeamMemberQuery query);

    MyTeamVO selectMyTeamInfo(@Param("userId") Long userId);

    MyTeamVO selectMyTeamInfo2(@Param("userId") Long userId);

    MyTeamStatisticsVO selectMyTeamStatistics(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

	int selectTeamMemberAdminCount(TeamMemberQuery query);

	List<TeamMemberAdminVO> selectTeamMemberAdminList(TeamMemberQuery query);

	TeamMemberCountStatisticsVO selectMyTeamMembersCountStatistics(@Param("userId") Long userId);
}
